package mainPackage;

import java.awt.EventQueue;

import boardStructure.Board;
import boardWindow.BoardFrame;
import boardWindow.Refresher;


public class Main {
	
	private static Board board;
	private static Game game;
	private static Thread runningGame;

	private static final int NUMBER_OF_ROWS = 9;
	private static final int NUMBER_OF_COLUMNS = 16;
	
	public static BoardFrame boardFrame;
	
	public static void main(String[] args){
		
		//Stworzenie Boardu
		board = new Board(NUMBER_OF_COLUMNS, NUMBER_OF_ROWS);
		
		//Stworzenie Gry
		game = new Game(board);
		runningGame = new Thread(game, "Game Thread");
		runningGame.start();
		
		//Stworzenie GUI
        EventQueue.invokeLater(new Runnable() {
            @Override
            public void run() {
                boardFrame = new BoardFrame(board);
            }
        });
	}
}
